
library(car)
library(lmtest)
library(multiwayvcov)

setwd("/Users/joelsievert/Dropbox/Research/Legislative Responsiveness/National Road/data/PRQ Replication")



#Maysville Veto

s21 <- read.csv("S21_extend.csv")

table(s21$extend)
t1 <- xtabs(~extend + jackson, s21)
t2 <- xtabs(~extend + slave, s21)
t3 <- xtabs(~extend + road, s21)



fisher.test(t1, conf.int = 0.9)
fisher.test(t2, conf.int = 0.9)
fisher.test(t3, conf.int = 0.9)




##Benton Amendments

s20 <- read.csv("S20_transfer.csv")

table(s20$transfer1)
table(s20$transfer2)

t1a <- xtabs(~transfer1 + jackson, s20)
t2a <- xtabs(~transfer1 + slave, s20)
t3a <- xtabs(~transfer1 + road, s20)


t1b <- xtabs(~transfer2 + jackson, s20)
t2b <- xtabs(~transfer2 + slave, s20)
t3b <- xtabs(~transfer2 + road, s20)


fisher.test(t1a, conf.int = 0.9)
fisher.test(t2a, conf.int = 0.9)
fisher.test(t3a, conf.int = 0.9)

fisher.test(t1b, conf.int = 0.9)
fisher.test(t2b, conf.int = 0.9)
fisher.test(t3b, conf.int = 0.9)



